/*
'===============================================================================
'  Generated From - CSharp_EasyObject_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL      = SQL_DAAB_StoredProcs.vbgen
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easily done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.Common;
using System.Configuration;
using System.Collections;
using System.Collections.Specialized;
using System.Xml;
using System.IO;

using Microsoft.Practices.EnterpriseLibrary.Data;
using NCI.EasyObjects;

namespace CMS.DAL
{

	#region Schema

	public class StaticPagesSchema : NCI.EasyObjects.Schema
	{
		private static ArrayList _entries;
		public static SchemaItem StaticPageID = new SchemaItem("StaticPageID", DbType.Int32, true, false, false, true, false, false);
		public static SchemaItem PageCode = new SchemaItem("PageCode", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem PageName1 = new SchemaItem("PageName1", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem PageName2 = new SchemaItem("PageName2", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem PageName3 = new SchemaItem("PageName3", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem MenuName1 = new SchemaItem("MenuName1", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem MenuName2 = new SchemaItem("MenuName2", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem MenuName3 = new SchemaItem("MenuName3", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem Parent = new SchemaItem("Parent", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem PageContent1 = new SchemaItem("PageContent1", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem PageContent2 = new SchemaItem("PageContent2", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem PageContent3 = new SchemaItem("PageContent3", DbType.String, SchemaItemJustify.None, 1073741823, true, false, false, false);
		public static SchemaItem DateCreated = new SchemaItem("DateCreated", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Images = new SchemaItem("Images", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem Priority = new SchemaItem("Priority", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Status = new SchemaItem("Status", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem Type = new SchemaItem("Type", DbType.Int32, false, true, false, false, false, false);
		public static SchemaItem PageLink = new SchemaItem("PageLink", DbType.String, SchemaItemJustify.None, 255, true, false, false, false);
		public static SchemaItem InitContent1 = new SchemaItem("InitContent1", DbType.String, SchemaItemJustify.None, 3000, true, false, false, false);
		public static SchemaItem InitContent2 = new SchemaItem("InitContent2", DbType.String, SchemaItemJustify.None, 3000, true, false, false, false);
		public static SchemaItem InitContent3 = new SchemaItem("InitContent3", DbType.String, SchemaItemJustify.None, 3000, true, false, false, false);

		public override ArrayList SchemaEntries
		{
			get
			{
				if (_entries == null )
				{
					_entries = new ArrayList();
					_entries.Add(StaticPagesSchema.StaticPageID);
					_entries.Add(StaticPagesSchema.PageCode);
					_entries.Add(StaticPagesSchema.PageName1);
					_entries.Add(StaticPagesSchema.PageName2);
					_entries.Add(StaticPagesSchema.PageName3);
					_entries.Add(StaticPagesSchema.MenuName1);
					_entries.Add(StaticPagesSchema.MenuName2);
					_entries.Add(StaticPagesSchema.MenuName3);
					_entries.Add(StaticPagesSchema.Parent);
					_entries.Add(StaticPagesSchema.PageContent1);
					_entries.Add(StaticPagesSchema.PageContent2);
					_entries.Add(StaticPagesSchema.PageContent3);
					_entries.Add(StaticPagesSchema.DateCreated);
					_entries.Add(StaticPagesSchema.Images);
					_entries.Add(StaticPagesSchema.Priority);
					_entries.Add(StaticPagesSchema.Status);
					_entries.Add(StaticPagesSchema.Type);
					_entries.Add(StaticPagesSchema.PageLink);
					_entries.Add(StaticPagesSchema.InitContent1);
					_entries.Add(StaticPagesSchema.InitContent2);
					_entries.Add(StaticPagesSchema.InitContent3);
				}
				return _entries;
			}
		}
		
		public static bool HasAutoKey 
		{
			get { return true;	}
		}

		public static bool HasRowID 
		{
			get { return false;	}
		}
	}
	#endregion

	public abstract class _StaticPages : EasyObject
	{

		public _StaticPages()
		{
			StaticPagesSchema _schema = new StaticPagesSchema();
			this.SchemaEntries = _schema.SchemaEntries;
			this.SchemaGlobal = "dbo";
		}
		
		public override void FlushData() 	 
		{ 	 
			this._whereClause = null; 	 
			this._aggregateClause = null; 	 
			base.FlushData(); 	 
		}
			   
		/// <summary>
		/// Loads the business object with info from the database, based on the requested primary key.
		/// </summary>
		/// <param name="StaticPageID"></param>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadByPrimaryKey(int StaticPageID)
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					ListDictionary parameters = new ListDictionary();

					// Add in parameters
					parameters.Add(StaticPagesSchema.StaticPageID.FieldName, StaticPageID);

					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetStaticPages", parameters, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.StaticPageID.Value = StaticPageID;
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}
	
		/// <summary>
		/// Loads all records from the table.
		/// </summary>
		/// <returns>A Boolean indicating success or failure of the query</returns>
		public bool LoadAll()
		{
			switch(this.DefaultCommandType)
			{
				case CommandType.StoredProcedure:
					return base.LoadFromSql(this.SchemaStoredProcedureWithSeparator + "sp_GetAllStaticPages", null, CommandType.StoredProcedure);

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					return this.Query.Load();

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		/// <summary>
		/// Adds a new record to the internal table.
		/// </summary>
		public override void AddNew()
		{
			base.AddNew();
			this.ApplyDefaults();
		}

		/// <summary>
		/// Apply any default values to columns
		/// </summary>
		protected override void ApplyDefaults()
		{
		}

		protected override DbCommand GetInsertCommand(CommandType commandType)
		{	
			DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_AddStaticPages";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddParameter(dbCommand, "StaticPageID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "StaticPageID", DataRowVersion.Default, Convert.DBNull);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!item.IsComputed)
						{
							if ((item.IsAutoKey && this.IdentityInsert) || !item.IsAutoKey)
							{
								this.Query.AddInsertColumn(item);
							}
						}
					}
					dbCommand = this.Query.GetInsertCommandWrapper();

					dbCommand.Parameters.Clear();
					if (this.IdentityInsert)
					{
						db.AddInParameter(dbCommand, "StaticPageID", DbType.Int32, "StaticPageID", DataRowVersion.Default);
					}
					else
					{
						db.AddParameter(dbCommand, "StaticPageID", DbType.Int32, 0, ParameterDirection.Output, true, 0, 0, "StaticPageID", DataRowVersion.Default, Convert.DBNull);
					}
					CreateParameters(db, dbCommand);

					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetUpdateCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_UpdateStaticPages";
					dbCommand = db.GetStoredProcCommand(sqlCommand);

					db.AddInParameter(dbCommand, "StaticPageID", DbType.Int32, "StaticPageID", DataRowVersion.Current);
					CreateParameters(db, dbCommand);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					foreach(SchemaItem item in this.SchemaEntries)
					{
						if (!(item.IsAutoKey || item.IsComputed))
						{
							this.Query.AddUpdateColumn(item);
						}
					}

					this.Where.WhereClauseReset();
					this.Where.StaticPageID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetUpdateCommandWrapper();

					dbCommand.Parameters.Clear();
					CreateParameters(db, dbCommand);
					db.AddInParameter(dbCommand, "StaticPageID", DbType.Int32, "StaticPageID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		protected override DbCommand GetDeleteCommand(CommandType commandType)
		{
            DbCommand dbCommand;

			// Create the Database object, using the default database service. The
			// default database service is determined through configuration.
			Database db = GetDatabase();

			switch(commandType)
			{
				case CommandType.StoredProcedure:
					string sqlCommand = this.SchemaStoredProcedureWithSeparator + "sp_DeleteStaticPages";
					dbCommand = db.GetStoredProcCommand(sqlCommand);
					db.AddInParameter(dbCommand, "StaticPageID", DbType.Int32, "StaticPageID", DataRowVersion.Current);
					
					return dbCommand;

				case CommandType.Text:
					this.Query.ClearAll();
					this.Where.WhereClauseReset();
					this.Where.StaticPageID.Operator = WhereParameter.Operand.Equal;
					dbCommand = this.Query.GetDeleteCommandWrapper();

					dbCommand.Parameters.Clear();
					db.AddInParameter(dbCommand, "StaticPageID", DbType.Int32, "StaticPageID", DataRowVersion.Current);
					
					return dbCommand;

				default:
					throw new ArgumentException("Invalid CommandType", "commandType");
			}
		}

		private void CreateParameters(Database db, DbCommand dbCommand)
		{
			db.AddInParameter(dbCommand, "PageCode", DbType.String, "PageCode", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageName1", DbType.String, "PageName1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageName2", DbType.String, "PageName2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageName3", DbType.String, "PageName3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "MenuName1", DbType.String, "MenuName1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "MenuName2", DbType.String, "MenuName2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "MenuName3", DbType.String, "MenuName3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Parent", DbType.Int32, "Parent", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageContent1", DbType.String, "PageContent1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageContent2", DbType.String, "PageContent2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageContent3", DbType.String, "PageContent3", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "DateCreated", DbType.Int32, "DateCreated", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Images", DbType.String, "Images", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Priority", DbType.Int32, "Priority", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Status", DbType.Int32, "Status", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "Type", DbType.Int32, "Type", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "PageLink", DbType.String, "PageLink", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent1", DbType.String, "InitContent1", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent2", DbType.String, "InitContent2", DataRowVersion.Current);
			db.AddInParameter(dbCommand, "InitContent3", DbType.String, "InitContent3", DataRowVersion.Current);
		}
		
		#region Properties
		public virtual int StaticPageID
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.StaticPageID.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.StaticPageID.FieldName, value);
			}
		}
		public virtual string PageCode
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageCode.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageCode.FieldName, value);
			}
		}
		public virtual string PageName1
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageName1.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageName1.FieldName, value);
			}
		}
		public virtual string PageName2
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageName2.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageName2.FieldName, value);
			}
		}
		public virtual string PageName3
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageName3.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageName3.FieldName, value);
			}
		}
		public virtual string MenuName1
		{
			get
			{
				return this.GetString(StaticPagesSchema.MenuName1.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.MenuName1.FieldName, value);
			}
		}
		public virtual string MenuName2
		{
			get
			{
				return this.GetString(StaticPagesSchema.MenuName2.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.MenuName2.FieldName, value);
			}
		}
		public virtual string MenuName3
		{
			get
			{
				return this.GetString(StaticPagesSchema.MenuName3.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.MenuName3.FieldName, value);
			}
		}
		public virtual int Parent
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.Parent.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.Parent.FieldName, value);
			}
		}
		public virtual string PageContent1
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageContent1.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageContent1.FieldName, value);
			}
		}
		public virtual string PageContent2
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageContent2.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageContent2.FieldName, value);
			}
		}
		public virtual string PageContent3
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageContent3.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageContent3.FieldName, value);
			}
		}
		public virtual int DateCreated
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.DateCreated.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.DateCreated.FieldName, value);
			}
		}
		public virtual string Images
		{
			get
			{
				return this.GetString(StaticPagesSchema.Images.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.Images.FieldName, value);
			}
		}
		public virtual int Priority
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.Priority.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.Priority.FieldName, value);
			}
		}
		public virtual int Status
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.Status.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.Status.FieldName, value);
			}
		}
		public virtual int Type
		{
			get
			{
				return this.GetInteger(StaticPagesSchema.Type.FieldName);
	    	}
			set
			{
				this.SetInteger(StaticPagesSchema.Type.FieldName, value);
			}
		}
		public virtual string PageLink
		{
			get
			{
				return this.GetString(StaticPagesSchema.PageLink.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.PageLink.FieldName, value);
			}
		}
		public virtual string InitContent1
		{
			get
			{
				return this.GetString(StaticPagesSchema.InitContent1.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.InitContent1.FieldName, value);
			}
		}
		public virtual string InitContent2
		{
			get
			{
				return this.GetString(StaticPagesSchema.InitContent2.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.InitContent2.FieldName, value);
			}
		}
		public virtual string InitContent3
		{
			get
			{
				return this.GetString(StaticPagesSchema.InitContent3.FieldName);
	    	}
			set
			{
				this.SetString(StaticPagesSchema.InitContent3.FieldName, value);
			}
		}

		public override string TableName
		{
			get { return "StaticPages"; }
		}
		
		#endregion		
		
		#region String Properties
		public virtual string s_StaticPageID
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.StaticPageID.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.StaticPageID.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.StaticPageID.FieldName);
			    else
			        this.StaticPageID = base.SetIntegerAsString(StaticPagesSchema.StaticPageID.FieldName, value);
			}
		}
		public virtual string s_PageCode
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageCode.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageCode.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageCode.FieldName);
			    else
			        this.PageCode = base.SetStringAsString(StaticPagesSchema.PageCode.FieldName, value);
			}
		}
		public virtual string s_PageName1
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageName1.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageName1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageName1.FieldName);
			    else
			        this.PageName1 = base.SetStringAsString(StaticPagesSchema.PageName1.FieldName, value);
			}
		}
		public virtual string s_PageName2
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageName2.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageName2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageName2.FieldName);
			    else
			        this.PageName2 = base.SetStringAsString(StaticPagesSchema.PageName2.FieldName, value);
			}
		}
		public virtual string s_PageName3
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageName3.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageName3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageName3.FieldName);
			    else
			        this.PageName3 = base.SetStringAsString(StaticPagesSchema.PageName3.FieldName, value);
			}
		}
		public virtual string s_MenuName1
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.MenuName1.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.MenuName1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.MenuName1.FieldName);
			    else
			        this.MenuName1 = base.SetStringAsString(StaticPagesSchema.MenuName1.FieldName, value);
			}
		}
		public virtual string s_MenuName2
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.MenuName2.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.MenuName2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.MenuName2.FieldName);
			    else
			        this.MenuName2 = base.SetStringAsString(StaticPagesSchema.MenuName2.FieldName, value);
			}
		}
		public virtual string s_MenuName3
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.MenuName3.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.MenuName3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.MenuName3.FieldName);
			    else
			        this.MenuName3 = base.SetStringAsString(StaticPagesSchema.MenuName3.FieldName, value);
			}
		}
		public virtual string s_Parent
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.Parent.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.Parent.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.Parent.FieldName);
			    else
			        this.Parent = base.SetIntegerAsString(StaticPagesSchema.Parent.FieldName, value);
			}
		}
		public virtual string s_PageContent1
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageContent1.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageContent1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageContent1.FieldName);
			    else
			        this.PageContent1 = base.SetStringAsString(StaticPagesSchema.PageContent1.FieldName, value);
			}
		}
		public virtual string s_PageContent2
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageContent2.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageContent2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageContent2.FieldName);
			    else
			        this.PageContent2 = base.SetStringAsString(StaticPagesSchema.PageContent2.FieldName, value);
			}
		}
		public virtual string s_PageContent3
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageContent3.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageContent3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageContent3.FieldName);
			    else
			        this.PageContent3 = base.SetStringAsString(StaticPagesSchema.PageContent3.FieldName, value);
			}
		}
		public virtual string s_DateCreated
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.DateCreated.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.DateCreated.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.DateCreated.FieldName);
			    else
			        this.DateCreated = base.SetIntegerAsString(StaticPagesSchema.DateCreated.FieldName, value);
			}
		}
		public virtual string s_Images
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.Images.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.Images.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.Images.FieldName);
			    else
			        this.Images = base.SetStringAsString(StaticPagesSchema.Images.FieldName, value);
			}
		}
		public virtual string s_Priority
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.Priority.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.Priority.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.Priority.FieldName);
			    else
			        this.Priority = base.SetIntegerAsString(StaticPagesSchema.Priority.FieldName, value);
			}
		}
		public virtual string s_Status
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.Status.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.Status.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.Status.FieldName);
			    else
			        this.Status = base.SetIntegerAsString(StaticPagesSchema.Status.FieldName, value);
			}
		}
		public virtual string s_Type
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.Type.FieldName) ? string.Empty : base.GetIntegerAsString(StaticPagesSchema.Type.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.Type.FieldName);
			    else
			        this.Type = base.SetIntegerAsString(StaticPagesSchema.Type.FieldName, value);
			}
		}
		public virtual string s_PageLink
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.PageLink.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.PageLink.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.PageLink.FieldName);
			    else
			        this.PageLink = base.SetStringAsString(StaticPagesSchema.PageLink.FieldName, value);
			}
		}
		public virtual string s_InitContent1
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.InitContent1.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.InitContent1.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.InitContent1.FieldName);
			    else
			        this.InitContent1 = base.SetStringAsString(StaticPagesSchema.InitContent1.FieldName, value);
			}
		}
		public virtual string s_InitContent2
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.InitContent2.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.InitContent2.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.InitContent2.FieldName);
			    else
			        this.InitContent2 = base.SetStringAsString(StaticPagesSchema.InitContent2.FieldName, value);
			}
		}
		public virtual string s_InitContent3
		{
			get
			{
			    return this.IsColumnNull(StaticPagesSchema.InitContent3.FieldName) ? string.Empty : base.GetStringAsString(StaticPagesSchema.InitContent3.FieldName);
			}
			set
			{
			    if(string.Empty == value)
			        this.SetColumnNull(StaticPagesSchema.InitContent3.FieldName);
			    else
			        this.InitContent3 = base.SetStringAsString(StaticPagesSchema.InitContent3.FieldName, value);
			}
		}
		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter StaticPageID
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.StaticPageID);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageCode
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageCode);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageName1
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageName1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageName2
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageName2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageName3
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageName3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter MenuName1
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.MenuName1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter MenuName2
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.MenuName2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter MenuName3
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.MenuName3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Parent
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.Parent);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageContent1
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageContent1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageContent2
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageContent2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageContent3
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageContent3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter DateCreated
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.DateCreated);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Images
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.Images);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Priority
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.Priority);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Status
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.Status);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter Type
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.Type);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter PageLink
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.PageLink);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent1
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.InitContent1);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent2
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.InitContent2);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}

				public WhereParameter InitContent3
				{
					get
					{
							WhereParameter wp = new WhereParameter(StaticPagesSchema.InitContent3);
							this._clause._entity.Query.AddWhereParameter(wp);
							return wp;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter StaticPageID
		    {
				get
		        {
					if(_StaticPageID_W == null)
	        	    {
						_StaticPageID_W = TearOff.StaticPageID;
					}
					return _StaticPageID_W;
				}
			}

			public WhereParameter PageCode
		    {
				get
		        {
					if(_PageCode_W == null)
	        	    {
						_PageCode_W = TearOff.PageCode;
					}
					return _PageCode_W;
				}
			}

			public WhereParameter PageName1
		    {
				get
		        {
					if(_PageName1_W == null)
	        	    {
						_PageName1_W = TearOff.PageName1;
					}
					return _PageName1_W;
				}
			}

			public WhereParameter PageName2
		    {
				get
		        {
					if(_PageName2_W == null)
	        	    {
						_PageName2_W = TearOff.PageName2;
					}
					return _PageName2_W;
				}
			}

			public WhereParameter PageName3
		    {
				get
		        {
					if(_PageName3_W == null)
	        	    {
						_PageName3_W = TearOff.PageName3;
					}
					return _PageName3_W;
				}
			}

			public WhereParameter MenuName1
		    {
				get
		        {
					if(_MenuName1_W == null)
	        	    {
						_MenuName1_W = TearOff.MenuName1;
					}
					return _MenuName1_W;
				}
			}

			public WhereParameter MenuName2
		    {
				get
		        {
					if(_MenuName2_W == null)
	        	    {
						_MenuName2_W = TearOff.MenuName2;
					}
					return _MenuName2_W;
				}
			}

			public WhereParameter MenuName3
		    {
				get
		        {
					if(_MenuName3_W == null)
	        	    {
						_MenuName3_W = TearOff.MenuName3;
					}
					return _MenuName3_W;
				}
			}

			public WhereParameter Parent
		    {
				get
		        {
					if(_Parent_W == null)
	        	    {
						_Parent_W = TearOff.Parent;
					}
					return _Parent_W;
				}
			}

			public WhereParameter PageContent1
		    {
				get
		        {
					if(_PageContent1_W == null)
	        	    {
						_PageContent1_W = TearOff.PageContent1;
					}
					return _PageContent1_W;
				}
			}

			public WhereParameter PageContent2
		    {
				get
		        {
					if(_PageContent2_W == null)
	        	    {
						_PageContent2_W = TearOff.PageContent2;
					}
					return _PageContent2_W;
				}
			}

			public WhereParameter PageContent3
		    {
				get
		        {
					if(_PageContent3_W == null)
	        	    {
						_PageContent3_W = TearOff.PageContent3;
					}
					return _PageContent3_W;
				}
			}

			public WhereParameter DateCreated
		    {
				get
		        {
					if(_DateCreated_W == null)
	        	    {
						_DateCreated_W = TearOff.DateCreated;
					}
					return _DateCreated_W;
				}
			}

			public WhereParameter Images
		    {
				get
		        {
					if(_Images_W == null)
	        	    {
						_Images_W = TearOff.Images;
					}
					return _Images_W;
				}
			}

			public WhereParameter Priority
		    {
				get
		        {
					if(_Priority_W == null)
	        	    {
						_Priority_W = TearOff.Priority;
					}
					return _Priority_W;
				}
			}

			public WhereParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public WhereParameter Type
		    {
				get
		        {
					if(_Type_W == null)
	        	    {
						_Type_W = TearOff.Type;
					}
					return _Type_W;
				}
			}

			public WhereParameter PageLink
		    {
				get
		        {
					if(_PageLink_W == null)
	        	    {
						_PageLink_W = TearOff.PageLink;
					}
					return _PageLink_W;
				}
			}

			public WhereParameter InitContent1
		    {
				get
		        {
					if(_InitContent1_W == null)
	        	    {
						_InitContent1_W = TearOff.InitContent1;
					}
					return _InitContent1_W;
				}
			}

			public WhereParameter InitContent2
		    {
				get
		        {
					if(_InitContent2_W == null)
	        	    {
						_InitContent2_W = TearOff.InitContent2;
					}
					return _InitContent2_W;
				}
			}

			public WhereParameter InitContent3
		    {
				get
		        {
					if(_InitContent3_W == null)
	        	    {
						_InitContent3_W = TearOff.InitContent3;
					}
					return _InitContent3_W;
				}
			}

			private WhereParameter _StaticPageID_W = null;
			private WhereParameter _PageCode_W = null;
			private WhereParameter _PageName1_W = null;
			private WhereParameter _PageName2_W = null;
			private WhereParameter _PageName3_W = null;
			private WhereParameter _MenuName1_W = null;
			private WhereParameter _MenuName2_W = null;
			private WhereParameter _MenuName3_W = null;
			private WhereParameter _Parent_W = null;
			private WhereParameter _PageContent1_W = null;
			private WhereParameter _PageContent2_W = null;
			private WhereParameter _PageContent3_W = null;
			private WhereParameter _DateCreated_W = null;
			private WhereParameter _Images_W = null;
			private WhereParameter _Priority_W = null;
			private WhereParameter _Status_W = null;
			private WhereParameter _Type_W = null;
			private WhereParameter _PageLink_W = null;
			private WhereParameter _InitContent1_W = null;
			private WhereParameter _InitContent2_W = null;
			private WhereParameter _InitContent3_W = null;

			public void WhereClauseReset()
			{
				_StaticPageID_W = null;
				_PageCode_W = null;
				_PageName1_W = null;
				_PageName2_W = null;
				_PageName3_W = null;
				_MenuName1_W = null;
				_MenuName2_W = null;
				_MenuName3_W = null;
				_Parent_W = null;
				_PageContent1_W = null;
				_PageContent2_W = null;
				_PageContent3_W = null;
				_DateCreated_W = null;
				_Images_W = null;
				_Priority_W = null;
				_Status_W = null;
				_Type_W = null;
				_PageLink_W = null;
				_InitContent1_W = null;
				_InitContent2_W = null;
				_InitContent3_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private EasyObject _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
		
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(EasyObject entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter StaticPageID
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.StaticPageID);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageCode
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageCode);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageName1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageName1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageName2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageName2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageName3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageName3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter MenuName1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.MenuName1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter MenuName2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.MenuName2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter MenuName3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.MenuName3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Parent
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.Parent);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageContent1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageContent1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageContent2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageContent2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageContent3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageContent3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter DateCreated
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.DateCreated);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Images
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.Images);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Priority
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.Priority);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Status
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.Status);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter Type
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.Type);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter PageLink
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.PageLink);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent1
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.InitContent1);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent2
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.InitContent2);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}

				public AggregateParameter InitContent3
				{
					get
					{
							AggregateParameter ap = new AggregateParameter(StaticPagesSchema.InitContent3);
							this._clause._entity.Query.AddAggregateParameter(ap);
							return ap;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter StaticPageID
		    {
				get
		        {
					if(_StaticPageID_W == null)
	        	    {
						_StaticPageID_W = TearOff.StaticPageID;
					}
					return _StaticPageID_W;
				}
			}

			public AggregateParameter PageCode
		    {
				get
		        {
					if(_PageCode_W == null)
	        	    {
						_PageCode_W = TearOff.PageCode;
					}
					return _PageCode_W;
				}
			}

			public AggregateParameter PageName1
		    {
				get
		        {
					if(_PageName1_W == null)
	        	    {
						_PageName1_W = TearOff.PageName1;
					}
					return _PageName1_W;
				}
			}

			public AggregateParameter PageName2
		    {
				get
		        {
					if(_PageName2_W == null)
	        	    {
						_PageName2_W = TearOff.PageName2;
					}
					return _PageName2_W;
				}
			}

			public AggregateParameter PageName3
		    {
				get
		        {
					if(_PageName3_W == null)
	        	    {
						_PageName3_W = TearOff.PageName3;
					}
					return _PageName3_W;
				}
			}

			public AggregateParameter MenuName1
		    {
				get
		        {
					if(_MenuName1_W == null)
	        	    {
						_MenuName1_W = TearOff.MenuName1;
					}
					return _MenuName1_W;
				}
			}

			public AggregateParameter MenuName2
		    {
				get
		        {
					if(_MenuName2_W == null)
	        	    {
						_MenuName2_W = TearOff.MenuName2;
					}
					return _MenuName2_W;
				}
			}

			public AggregateParameter MenuName3
		    {
				get
		        {
					if(_MenuName3_W == null)
	        	    {
						_MenuName3_W = TearOff.MenuName3;
					}
					return _MenuName3_W;
				}
			}

			public AggregateParameter Parent
		    {
				get
		        {
					if(_Parent_W == null)
	        	    {
						_Parent_W = TearOff.Parent;
					}
					return _Parent_W;
				}
			}

			public AggregateParameter PageContent1
		    {
				get
		        {
					if(_PageContent1_W == null)
	        	    {
						_PageContent1_W = TearOff.PageContent1;
					}
					return _PageContent1_W;
				}
			}

			public AggregateParameter PageContent2
		    {
				get
		        {
					if(_PageContent2_W == null)
	        	    {
						_PageContent2_W = TearOff.PageContent2;
					}
					return _PageContent2_W;
				}
			}

			public AggregateParameter PageContent3
		    {
				get
		        {
					if(_PageContent3_W == null)
	        	    {
						_PageContent3_W = TearOff.PageContent3;
					}
					return _PageContent3_W;
				}
			}

			public AggregateParameter DateCreated
		    {
				get
		        {
					if(_DateCreated_W == null)
	        	    {
						_DateCreated_W = TearOff.DateCreated;
					}
					return _DateCreated_W;
				}
			}

			public AggregateParameter Images
		    {
				get
		        {
					if(_Images_W == null)
	        	    {
						_Images_W = TearOff.Images;
					}
					return _Images_W;
				}
			}

			public AggregateParameter Priority
		    {
				get
		        {
					if(_Priority_W == null)
	        	    {
						_Priority_W = TearOff.Priority;
					}
					return _Priority_W;
				}
			}

			public AggregateParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public AggregateParameter Type
		    {
				get
		        {
					if(_Type_W == null)
	        	    {
						_Type_W = TearOff.Type;
					}
					return _Type_W;
				}
			}

			public AggregateParameter PageLink
		    {
				get
		        {
					if(_PageLink_W == null)
	        	    {
						_PageLink_W = TearOff.PageLink;
					}
					return _PageLink_W;
				}
			}

			public AggregateParameter InitContent1
		    {
				get
		        {
					if(_InitContent1_W == null)
	        	    {
						_InitContent1_W = TearOff.InitContent1;
					}
					return _InitContent1_W;
				}
			}

			public AggregateParameter InitContent2
		    {
				get
		        {
					if(_InitContent2_W == null)
	        	    {
						_InitContent2_W = TearOff.InitContent2;
					}
					return _InitContent2_W;
				}
			}

			public AggregateParameter InitContent3
		    {
				get
		        {
					if(_InitContent3_W == null)
	        	    {
						_InitContent3_W = TearOff.InitContent3;
					}
					return _InitContent3_W;
				}
			}

			private AggregateParameter _StaticPageID_W = null;
			private AggregateParameter _PageCode_W = null;
			private AggregateParameter _PageName1_W = null;
			private AggregateParameter _PageName2_W = null;
			private AggregateParameter _PageName3_W = null;
			private AggregateParameter _MenuName1_W = null;
			private AggregateParameter _MenuName2_W = null;
			private AggregateParameter _MenuName3_W = null;
			private AggregateParameter _Parent_W = null;
			private AggregateParameter _PageContent1_W = null;
			private AggregateParameter _PageContent2_W = null;
			private AggregateParameter _PageContent3_W = null;
			private AggregateParameter _DateCreated_W = null;
			private AggregateParameter _Images_W = null;
			private AggregateParameter _Priority_W = null;
			private AggregateParameter _Status_W = null;
			private AggregateParameter _Type_W = null;
			private AggregateParameter _PageLink_W = null;
			private AggregateParameter _InitContent1_W = null;
			private AggregateParameter _InitContent2_W = null;
			private AggregateParameter _InitContent3_W = null;

			public void AggregateClauseReset()
			{
				_StaticPageID_W = null;
				_PageCode_W = null;
				_PageName1_W = null;
				_PageName2_W = null;
				_PageName3_W = null;
				_MenuName1_W = null;
				_MenuName2_W = null;
				_MenuName3_W = null;
				_Parent_W = null;
				_PageContent1_W = null;
				_PageContent2_W = null;
				_PageContent3_W = null;
				_DateCreated_W = null;
				_Images_W = null;
				_Priority_W = null;
				_Status_W = null;
				_Type_W = null;
				_PageLink_W = null;
				_InitContent1_W = null;
				_InitContent2_W = null;
				_InitContent3_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private EasyObject _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	}
}
